import { userInfo } from '@/views/login/type'
import http from '../../utils/axios'

// 获取用户信息 可传id
export const userInfoAPI = (id?: number | null, account?: string) =>
  http<any, userInfo[]>({
    url: '/user/getUserInfo',
    method: 'POST',
    data: {
      id,
      account,
    },
  })
// 修改用户信息
export const userChangeInfoAPI = (data: any) =>
  http<any, userInfo>({
    url: '/user/changeInfo',
    method: 'POST',
    data,
  })
// 绑定头像
export const bindAccountAPI = (data: any) =>
  http({
    url: '/user/bindAccount',
    method: 'POST',
    data,
  })
